{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b0c1a604-fa53-43cc-8d1c-93a1d2741feb",
   "metadata": {},
   "source": [
    " # 常用MS-DOS命令行"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e444efb8-3cd7-4eb5-8849-4f9c1910f6c5",
   "metadata": {},
   "source": [
    "1.\t改变盘符 C:, D:, E:, F:…., \n",
    "D:<回车>\n",
    "    (base)D:\\>\n",
    "2.\tC:\n",
    "3.\tcd<回车> - 检查当前的目录 \n",
    "4.\tcd<sp>文件夹的名字\n",
    "   change directory\n",
    "d:\n",
    "cd \\work\n",
    "5.\tmake directory\n",
    "md<sp>wangfeng\n",
    "D:\\> md d:\\work\\wangfeng\\1\n",
    "\n",
    "cd d:\\work\\wangfeng\\1\n",
    "\n",
    "6.\tremove directory\n",
    "rd<sp>wangfeng\n",
    "7.\techo<sp>“I love you” > 1.txt\n",
    "8.\tdir – 列出所有的文件\n",
    "* 表示所有的组合\n",
    "d\n",
    "9.\ttype<sp>文件名.扩展名\n",
    "10.\tcopy<sp> <源文件名> <目标文件名>\n",
    "copy 1.txt 2.txt\n",
    "\t\n",
    "绝对路径\n",
    "copy d:\\work\\4.dat d:\\work\\wangfeng\\1\\5.dat\n",
    "\n",
    "相对相径\n",
    "copy 4.dat .\\wangfeng\\1\\5.dat\n",
    "\n",
    " 11 del  (DELETE)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6392a086-92e0-4f90-9426-07ba9dfd04d2",
   "metadata": {},
   "source": [
    " # 常用git命令"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "91521572-6d9a-4121-acf1-0c361bde834c",
   "metadata": {},
   "source": [
    "git status\n",
    "\n",
    "git add .增加修改后文件\n",
    "\n",
    "git commit -m \"\"提交文件\n",
    "\n",
    "git push"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c299b561-832a-4a33-9a3f-3415421efa30",
   "metadata": {},
   "source": [
    " # Python的变量名规则 "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5b9f5323-d8f1-44ce-8c32-80183cbb3f5b",
   "metadata": {},
   "source": [
    "1、必须由字母、下划线、数字组成\n",
    "\n",
    "2、不能以数字开头\n",
    "\n",
    "3、区分大小写\n",
    "\n",
    "4、不能是关键字（保留字）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "49adbc4e-118a-423b-b58d-a3a60cc8caab",
   "metadata": {},
   "source": [
    " # 变量类型 "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2dc625e0-1d91-4df7-95eb-8948cb07f1e8",
   "metadata": {},
   "source": [
    "值： 整数(int)，浮点数 (float)，布尔值(bool)，空值 (NoneType)，字符串 (str),复数(complex)\n",
    "\n",
    "集合： 列表 (list)，元组(tuple)，集合 (set)，字典 (dict)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7eb5d291-351d-478f-ab5d-84f1322e03c2",
   "metadata": {},
   "source": [
    " # 常用的运算符"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "85f8257c-8088-4e62-bb49-9f7f0c22ee59",
   "metadata": {},
   "source": [
    "(1)\\+ 加\n",
    "\n",
    "(2)\\- 减\n",
    "\n",
    "(3)\\* 乘\n",
    "\n",
    "(4)/ 除\n",
    "\n",
    "(5)// 取整除\n",
    "\n",
    "(6)% 取模\n",
    "\n",
    "(7)** 幂"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "41166e2f-f13c-4aad-a185-9bcf2f5892d3",
   "metadata": {},
   "source": [
    "(8)==\t等于\t比较值是否相等\n",
    "\n",
    "(9)!=\t不等于\t比较值是否不相等\n",
    "\n",
    "(10)\\>\t大于\t左值是否大于右值\n",
    "\n",
    "(11)<\t小于\t左值是否小于右值\n",
    "\n",
    "(12)\\>=\t大于等于\t左值是否大于等于右值\n",
    "\n",
    "(13)<=\t小于等于\t左值是否小于等于右值"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c5e40c4d-1f06-4aff-8424-0ec5f75baa28",
   "metadata": {},
   "source": [
    " # 摄氏度和华氏度转换程序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a970d0d0-0796-4a04-9945-b5c419a03cfb",
   "metadata": {},
   "outputs": [],
   "source": [
    "temperature = eval(input(\"请输入温度值: \"))\n",
    "unit = input(\"请输入温度单位(C or F): \")\n",
    "C_unit = \"摄氏度\"\n",
    "F_unit = \"华氏度\"\n",
    "\n",
    "if unit == 'C':\n",
    "    F = temperature * 9/5 + 32\n",
    "    result = F\n",
    "elif unit == 'F':\n",
    "    C = (temperature - 32) * 5/9\n",
    "    result = C\n",
    "else:\n",
    "    print(\"错误：请输入有效的温度单位（C or F）\")\n",
    "    exit()\n",
    "\n",
    "print(f\"{temperature:.2f}{C_unit} = {result:.2f}{F_unit}\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:base] *",
   "language": "python",
   "name": "conda-base-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
